A language is basically a set of sentences that can be formed by following certain rules. The basic building block of any language is its alphabet. There are numerous languages existing today in the same way. The sentences are a collection of words that are formed from the letters of the alphabet. There are certain rules to be followed when putting these words together. These rules are called grammar of the language and are unique for each and every language. These rules determine the valid sentences of the language. Thus one can define grammar as a concise specification using which, it is possible to generate all the valid sentences of the language. A grammar specifies the syntax or structure of a language; irrespective of whether it is a language such as English or programming language such as ‘C’ or assembly language.
Very often, it is required to convert sentences in one language to equivalent sentences in another language. For example from English to French or from a programming language to assembly language. To perform such tasks the language grammars have to be specified and the source language statements should be validated and translated to sentences in the target language.
A method used in the prior art for translating a language to another language used is carried out in the following manner.
Define the source language grammar. Parse the sentences and convert them to a predefined intermediate format and translate finally, the intermediate format to the target language.
The disadvantages in performing a translation by the above mentioned method are the following                (i) This method will not allow equivalence of the source language grammar and target language grammar to be specified. Thus there is no real correspondence between source language grammar and target language grammar.        (ii) Normally this method allows the translation from one source language to one target language only. Mapping to multiple target languages will not be possible.        (iii) Mapping from a source language to a target language is predefined and thus supporting translations to new languages will be difficult.        